<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心-站内消息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>
<style type="text/css">
th{background:#EFEFEF}
.edit span{background:#efefef;}
.search {margin:5px;}
.search input {color:#444;}
td.img img{cursor:pointer}
</style>
 
</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
    </div>
<link href="<?php echo $this->_webroot('/user/css/shoprequest.css'); ?>" rel="stylesheet" type="text/css" />   
    <div class="main-right main_right">
            <div class="cont">

	            <div class="cont_title">站内消息</div>
				<div class="clear" style="height:5px;"></div>				
	            <hr />

				<form action="<?php echo $this->_url('remind/remindup/');?>" method="post" name="form_profile" onsubmit="return submitform();">
				<table width="98%" class="form_table">
					<tr class="center">
						<th width="35" ><input type="checkbox" onclick="checkall(this);" value='' /></th>
						<th>消息内容</th>
						<th>发出时间</th>
						<th>消息状态</th>
						<th>操作</th>
					</tr>
				<?php foreach($remind_rs as $val){
				    $val = $val['remindinfo'];
				?>
					<tr class="center">
						<td><input type="checkbox" name="searchkey[]" value=<?php echo $val['id'];?> /></td>
						<td class="left"><?php echo $val['remind_info'];?></td>
						<td><?php echo $val['remind_time'];?></td>
						<td><?php if($val['isread']==0){?><span style='color:red;'> <?php }?><?php echo $type[$val['isread']];?></td>
						<td>
						<?php if($val['isread']==0){?><a href="<?php echo $this->_url('remind/remindup/');?>?searchkey=<?php echo $val['id'];?>&updsubmit=updsubmit">标为已读</a> | <?php }?>
						<?php if($val['isread']!=2){?><a href="<?php echo $this->_url('remind/remindup/');?>?searchkey=<?php echo $val['id'];?>&deletesubmit=deletesubmit" onclick="return confirm('确定要执行此操作吗？');">删除</a><?php }?>
						<?php if($val['isread']==2){?><?php echo $type[$val['isread']];?><?php }?>
						</td>
					</tr>
				<?php }?>
				<tr><td colspan="5"><INPUT class="submit" onclick="return confirm('确定要执行此操作吗？');" type=submit value="标为已读" name=updsubmit> <INPUT class="submit" onclick="return confirm('确定要执行此操作吗？');" type=submit value="删除" name=deletesubmit> </td></tr>
				</table>
				</form>
				
			  
            </div>
    </div>
    <div class="clear"></div>
</div>

<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
<script language="JavaScript">
<!--
var inputs = document.getElementsByTagName("input");
function submitform() {
	var checknum = 0;
	for(var i=0; i<inputs.length; i++) {
		if(inputs[i].type=='checkbox') {
			if(inputs[i].checked && inputs[i].value) {
				checknum++;
			}
		}
	}
	if(checknum==0) {
		alert("至少要选择一项！");
		return false;
	}
	return true;
}
function checkall(obj) {
	if(obj.checked) {
		for(var i=0; i<inputs.length; i++) {
			if(inputs[i].type=='checkbox') {
				inputs[i].checked = true;
			}
		}
	} else {
		for(var i=0; i<inputs.length; i++) {
			if(inputs[i].type=='checkbox') {
				inputs[i].checked = false;
			}
		}
	}
}
//-->
</script>
</body>
</html>